<?php /*a:2:{s:57:"/docker/www/order_meal/PHP/app/admin/view/user/index.html";i:1638597550;s:60:"/docker/www/order_meal/PHP/app/admin/view/layout/layout.html";i:1638597550;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>管理后台</title>
	<meta name="author" content="">
	<meta name="keywords" content="">
	<meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="referrer" content="no-referrer-when-downgrade">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="/favicon.png"/>
    <link rel="stylesheet" href="/assets/plugins/amazeui/amazeui.min.css"/>
    <link rel="stylesheet" href="/assets/css/hema.app.css"/>
    <script src="/assets/js/lang.js"></script>
    <script src="/assets/plugins/jquery/jquery.min.js"></script>
	<link rel="stylesheet" href="/assets/plugins/iconfont/iconfont.css">
    <script src="/assets/plugins/iconfont/iconfont.js"></script>
    <script>
        BASE_URL = '<?php echo isset($base_url) ? $base_url : ''; ?>';
        STORE_URL = '<?php echo isset($store_url) ? $store_url : ''; ?>';
    </script>
</head>

<body data-type="">
<div class="am-g tpl-g">
    <!-- 头部 -->
    <header class="tpl-header">
        <!-- 右侧内容 -->
        <div class="tpl-header-fluid">
            <!-- 侧边切换 -->
            <div class="am-fl tpl-header-button switch-button">
                <i class="iconfont iconzhedie"></i>
            </div>
            <!-- 刷新页面 -->
            <div class="am-fl tpl-header-button refresh-button">
                <i class="iconfont iconshuaxin"></i>
            </div>
            <!-- 其它功能-->
            <div class="am-fr tpl-header-navbar">
                <ul>
                    <!-- 当前版本 -->
                    <li class="am-text-sm">
                            <a><small style="color:#ccc;">版本：<?= $version ?></small></a>
                    </li>
                    <!-- 欢迎语 -->
                    <li class="am-text-sm">
                        <a href="<?php echo url('passport/renew'); ?>">
							<img  src="/assets/img/avatar.png" /> <?php echo htmlentities($user['user']['user_name']); ?>
                        </a>
                    </li>
                    <!-- 退出 -->
                    <li class="am-text-sm">
                        <a href="<?php echo url('passport/logout'); ?>">
                            <i class="iconfont icontuichu"></i> 退出
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </header>
    <!-- 侧边导航栏 -->
    <div class="left-sidebar dis-flex">
        <?php $menus = $menus ?: []; $group = $group ?: 0; $second = isset($menus[$group]['submenu']) ? $menus[$group]['submenu'] : []?>
        <!-- 一级菜单 -->
        <ul class="sidebar-nav">
            <li class="sidebar-nav-heading">管理后台</li>
            <?php foreach($menus as $key=>$item): ?> 
                <li class="sidebar-nav-link">
                    <a href="<?php echo isset($item['index']) ? url($item['index']) : 'javascript:void(0);'; ?>"
                       class="<?php echo !empty($item['active']) ? 'active'  :  ''; ?>">
                        <?php if((isset($item['is_svg']) && ($item['is_svg'] == true))): ?>
                            <svg class="icon sidebar-nav-link-logo" aria-hidden="true">
                                <use xlink:href="#<?php echo htmlentities($item['icon']); ?>"></use>
                            </svg>
                        <?php else: ?>
                            <i class="iconfont sidebar-nav-link-logo <?php echo htmlentities($item['icon']); ?>"
                               style="{isset($item.color) ? 'color:'.$item.color.';' : '' }"></i>
                        <?php endif; ?>
                        <?php echo htmlentities($item['name']); ?>
                    </a>
                </li>
            <?php endforeach; ?>
        </ul>
        <!-- 子级菜单-->
        <?php if((sizeof($second) > 0)): ?>
            <ul class="left-sidebar-second">
                <li class="sidebar-second-title"><?php echo htmlentities($menus[$group]['name']); ?></li>
                <li class="sidebar-second-item">
                    <?php foreach($second as $key=>$item): if((!isset($item['submenu']))): ?>
                            <!-- 二级菜单-->
                            <a href="<?php echo url($item['index']); ?>" class="<?php echo !empty($item['active']) ? 'active'  :  ''; ?>">
                                <?php echo htmlentities($item['name']); ?>
                            </a>
                        <?php else: ?>
                            <!-- 三级菜单-->
                            <div class="sidebar-third-item">
                                <a href="javascript:void(0);"
                                   class="sidebar-nav-sub-title <?php echo !empty($item['active']) ? 'active'  :  ''; ?>">
                                    <i class="iconfont icongengduo"></i>
                                    <?php echo htmlentities($item['name']); ?>
                                </a>
                                <ul class="sidebar-third-nav-sub">
                                    <?php foreach($item['submenu'] as $third): ?>
                                        <li>
                                            <a class="<?php echo !empty($third['active']) ? 'active'  :  ''; ?>"
                                               href="<?php echo url($third['index']); ?>">
                                                <?php echo htmlentities($third['name']); ?>
                                            </a>
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                            </div>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </li>
            </ul>
        <?php endif; ?>
    </div>

    <!-- 内容区域 start -->
    <div class="tpl-content-wrapper <?php echo sizeof($second) == 0 ? 'no-sidebar-second' : ''; ?>">
        <div class="row-content am-cf">
    <div class="row layui-form layui-form-pane">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf"><?php echo htmlentities($title); ?>列表</div>
                </div>
                <div class="widget-body am-fr">
                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>头像</th>
                                <th>昵称</th>
                                <th>性别</th>
                                <th>钱包</th>
								<th>积分</th>
								<th>电话</th>
                                <th>省份</th>
                                <th>城市</th>
                                <th>代理</th>
								<th>注册</th>
                                <th>管理</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if(!$list->isEmpty()): foreach($list as $item): ?>
                                <tr>
                                    <td class="am-text-middle"><?php echo htmlentities($item['user_id']); ?></td>
                                    <td class="am-text-middle">
                                        <img src="<?php echo htmlentities($item['avatar']); ?>" width="72" height="72" alt="">
                                    </td>
                                    <td class="am-text-middle"><?php echo htmlentities($item['nickname']); ?></td>	
                                    <td class="am-text-middle"><?php echo htmlentities($item['gender']); ?></td>
                                    <td class="am-text-middle"><?php echo htmlentities($item['money']); ?></td>
                                    <td class="am-text-middle"><?php echo htmlentities($item['score']); ?></td>
                                    <td class="am-text-middle"><?php echo htmlentities($item['phone']); ?></td>
                                    <td class="am-text-middle"><?php echo !empty($item['province']) ? htmlentities($item['province']) : '--'; ?></td>
                                    <td class="am-text-middle"><?php echo !empty($item['city']) ? htmlentities($item['city']) : '--'; ?></td>
                                    <td class="am-text-middle">
                                        <?php if($status != 10): ?>
                                            <span class="j-state am-badge x-cur-p  <?= $item['status']['value'] == 30 ? ' am-badge-success'
                                                : ' am-badge-warning' ?>" 
                                                 data-ids="<?= $item['user_id'] ?>"
                                                 data-status="<?= $item['status']['value'] ?>">
                                            <?php echo $item['status']['value']==30 ? '是' : '否'; ?>
                                            </span>
                                        <?php endif; ?>
                                    </td>
									<td class="am-text-middle"><?php echo htmlentities($item['create_time']); ?></td>
                                    <td class="am-text-middle">
                                        <div class="tpl-table-black-operation">
                                            <?php if($item['status']['value'] > 10): ?>
                                            <a href="<?php echo url('user/oneKey',['id' => $item['user_id'],'title' => $title]); ?>" target="_blank">
                                                <i class="am-icon-user"></i> 登录
                                            </a>
                                            <?php endif; ?>
                                        </div>
                                    </td>
                                </tr>
                                <?php endforeach; else: ?>
                                <tr>
                                    <td colspan="12" class="am-text-center">暂无记录</td>
                                </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr"><?php echo $list->render(); ?> </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：<?php echo $list->total(); ?></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        
        // 切换状态
        $('.j-state').click(function () {
            var data = $(this).data();
            var msg = '确定要'+(parseInt(data.status) === 30 ? '取消' : '设置为')+'代理？';
            $('.j-state').del('id', "<?php echo url('user/status'); ?>",msg);
        });

    });
</script>
    </div>
    <!-- 内容区域 end -->

</div>
<script src="/assets/plugins/vue/vue.min.js"></script>
<script src="/assets/plugins/layer/layer.js"></script>
<script src="/assets/plugins/jquery/jquery.form.min.js"></script>
<script src="/assets/plugins/amazeui/amazeui.min.js"></script>
<script src="/assets/js/webuploader.html5only.js"></script>
<script src="/assets/js/art-template.js"></script>
<script src="/assets/js/file.library.js"></script>
</body>

</html>
